package com.cpsdna.bean.user;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Table;

import java.util.Date;

/**
 * Created by Jianghao on 2017/3/1.
 *
 * @author Howe(howechiang@gmail.com)
 */
@Table("user_operation_log")
public class OperationLog {

    /**
     * 用户ID
     */
    @Column("user_id")
    private Integer userId;

    /**
     * 操作设备
     */
    @Column("operation_agent")
    private String operationAgent;

    /**
     * 操作IP
     */
    @Column("operation_ip")
    private String operationIP;

    /**
     * 动作
     */
    @Column("operation_motion")
    private String operationMotion;

    /**
     * 操作时间
     */
    @Column("operation_time")
    private Date operationTime;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getOperationAgent() {
        return operationAgent;
    }

    public void setOperationAgent(String operationAgent) {
        this.operationAgent = operationAgent;
    }

    public String getOperationIP() {
        return operationIP;
    }

    public void setOperationIP(String operationIP) {
        this.operationIP = operationIP;
    }

    public String getOperationMotion() {
        return operationMotion;
    }

    public void setOperationMotion(String operationMotion) {
        this.operationMotion = operationMotion;
    }

    public Date getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(Date operationTime) {
        this.operationTime = operationTime;
    }

    public OperationLog(Integer userId, String operationAgent, String operationIP, String operationMotion, Date operationTime) {
        this.userId = userId;
        this.operationAgent = operationAgent;
        this.operationIP = operationIP;
        this.operationMotion = operationMotion;
        this.operationTime = operationTime;
    }

    public OperationLog() {
    }

    @Override
    public String toString() {
        return "OperationLog{" +
                "userId=" + userId +
                ", operationAgent='" + operationAgent + '\'' +
                ", operationIP='" + operationIP + '\'' +
                ", operationMotion='" + operationMotion + '\'' +
                ", operationTime=" + operationTime +
                '}';
    }
}
